import { getRequest, postRequest, postRequestWithNoForm, putRequest, deleteRequest } from '@/libs/axios';

// -----------------------字典类型--------------------
//  获取字典类型列表
export const getDictTypes = (params) => {
  return getRequest('/common/dictType', params)
}
//  字典类型修改
export const editDictType = (params) => {
  return postRequestWithNoForm('/common/dictType/save', params)
}
//  字典类型删除
export const delDictType = (params) => {
  return postRequestWithNoForm('/common/dictType/delete', params)
}
// -----------------------字典数据--------------------
//  字典数据刷新缓存
export const refreshDictType = (params) => {
  return postRequest('/common/dictType/refreshCache', params)
}
//  获取全部的字典列表,用于存缓存
export const getAllDict = (params) => {
  return getRequest('/common/dictType/all', params)
}
//  字典数据列表
export const getDictData = (params) => {
  return getRequest('/common/dictData', params)
}
//  字典数据修改
export const editDictData = (params) => {
  return postRequestWithNoForm('/common/dictData/save', params)
}
//  字典数据删除
export const delDictData = (params) => {
  return postRequestWithNoForm('/common/dictData/delete', params)
}